<?php
/**
 * 默认配置 
 *
 * @filesource _policy.array.php
 * @package peck
 * @subpackage _default
 * @version $id: 0.1, utf8, Wed Jan 13 23:39:10 CST 2010
 * @author LD King <kldscs[at]gmail.com>
 * @copyright Copyleft (D.) 2007 - 2010 MiFunny China Inc.
 * @link http://mifunny.info/
 * @example 
 *   
 */
//error_reporting(E_ALL & ~(E_STRICT | E_NOTICE));
return array(
	//系统常量
	'sys' => array(
		'time' => 0, //开始时间
        'root_path' => '', //系统目录
        'site_url' => '', //网站URL
        'peck_path' => '', //PECK工具箱目录, dirname(__FILE__)
        
        'model_path' => '', //模型目录
        'controller_path' => '', //控制器目录
        'view_path' => '', //模板目录
        'helper_path' => '', //助手目录
        
        //'charset' => 'UTF-8', 
        'gzip' => false, //使用gzip压缩输出 
        'gzip_level' => 6, //压缩等级为6, 最大9
        'timezone' => 'Asia/Shanghai',
	),
	
	//会话配置
	'session' => array(
		'prefix' => 'peck', //eg. peck::key
		'session_ttl' => 1440, //ini_get('session.gc_maxlifetime');
		'cookie_lifetime' => 42000, // The lifetime of the cookie in seconds. (1个月)
		'cookie_domain' => null, // The domain of the cookie. 
		
		'save_path' => null,  //保存目录 session_save_path 
		'cache_limiter' => 'private', //session_cache_limiter
		'cache_expire' => null, //session_cache_expire
	),
	
    //URL 调度器, 预仿django
    'url' => array(
		'method' => 'standard', //standard、rewrite
		//'dispatcher' => array(),
	),

	//模板引擎配置 	'view' => array( 
		//模板目录 'TEMPLATEPATH' => '', ),

	//数据库配置
	'database' => array(
		//数据库驱动, 参见 http://www.php.net/manual/en/pdo.drivers.php
		'driver' => 'mysql',
		'dsn' => 'mysql:dbname=test;host=locahost;port=3306',
		'username' => 'test', 
		'password' => 'test',
		//'charset' => 'utf8',
		//'collate' => 'utf8_general_ci',
		//额外选项, 参见 http://www.php.net/manual/en/pdo.setattribute.php
    	'options' => array( 
			'ATTR_PERSISTENT' => FALSE, //是否使用长连接 	
		//	'MYSQL_ATTR_USE_BUFFERED_QUERY' => TRUE,
   			),
		),

	//缓存配置
	'cache' => array(
		'cache_type' => 'serialfile', //serialfile: 文件缓存; phpmencached 内存缓存类型;
		'cache_dir' => '/tmp', //缓存目录(必须)
		'life_time' => 900, //全局缓存时间 900s.
		'encoding_key' => true, //加密缓存ID, 即 MD5($key): 文件缓存建议打开, 内存则关闭;
		
		// 下面为内存缓存(phpmencached)独有配置
		//'servers' => array(		//缓存服务器,至少填一个(必需)
		//		array( 'host' => '127.0.0.1', 'port' => '11211', 'weight' => 99, ),
		//		array( 'host' => '192.168.1.112', 'port' => '11211', 'weight' => 32, ),	
		//		), 
		//'persistent' => true, //持久连接
		//'compressed' => false, //压缩数据与否
		),

);//END array policy 
?>
